package com.flashcash.solu.bean;

import com.flashcash.solu.enums.LoanType;
import com.flashcash.solu.enums.PeriodType;

/**
 * @作者:My
 * @创建日期: 2017/7/13 15:43
 * @描述:${TODO}
 * @更新者:${Author}$
 * @更新时间:${Date}$
 * @更新描述:${TODO}
 */

public class TotalAmount {
    private long productId = 1L;
    private String loanType = LoanType.PAYDAY.name();
    private double amount = 0.0;
    private int day = 0;
    private String periodUnit = PeriodType.D.name();

    private double rate = 0.0;
    private double totalRepayment;

    public long getProductId() {
        return productId;
    }

    public void setProductId(long productId) {
        this.productId = productId;
    }

    public String getLoanType() {
        return loanType;
    }

    public void setLoanType(String loanType) {
        this.loanType = loanType;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    public void setTotalRepayment(double totalRepayment) {
        this.totalRepayment = totalRepayment;
    }

    public String getPeriodUnit() {
        return periodUnit;
    }

    public void setPeriodUnit(String periodUnit) {
        this.periodUnit = periodUnit;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(int rate) {
        this.rate = rate;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public double getTotalRepayment() {
        return totalRepayment = amount + amount * day * rate / 100;
    }

}
